package com.central.common.model;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.Date;

/**
 * 实体父类
 *
 * @author zlt
 */
@Setter
@Getter
public class SuperEntity<T extends Model<?>> extends Model<T> {
    /**
     * 主键ID
     */
    @TableId
    public Long id;

    @TableField(fill = FieldFill.INSERT)
    public Date createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    public Date updateTime;

    public Long createBy;

    public Long updateBy;

    @TableLogic
    public Integer del = 0;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}
